package com.wd.tech.api;


import com.wd.tech.bean.FindCommunityListBean;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.DELETE;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

/**
 * 时间：2020/7/1
 * 作者：徐黎明
 * 类的作用：
 */
public interface ApiService {
    //注册 //登录
    @POST
    @FormUrlEncoded
    Observable<ResponseBody> GetRegisterInfo(@Url String url, @FieldMap Map<String, Object> map);

    //社区列表
    @GET
    Observable<ResponseBody> GetCommunityInfo(@Url String url,@QueryMap Map<String, Object> map);

    //点赞
    @POST
    @FormUrlEncoded
    Observable<ResponseBody> AddCommunity(@Url String url, @FieldMap Map<String, Object> map);

    //发布帖子
    @POST
    @FormUrlEncoded
    Observable<ResponseBody> ReleasePost(@Url String url,@PartMap Map<String, RequestBody> map);

    //取消点赞
    @DELETE
    Observable<ResponseBody> CancelAdd(@Url String url,@QueryMap HashMap<String, Object> map);
    //查询banner
    @GET
    Observable<ResponseBody> GetXBannerInfo(@Url String url);

    //展示资讯首页
    @GET
    Observable<ResponseBody> GetNewsSh(@Url String url, @QueryMap Map<String ,Object>map);

    ////展示兴趣频道
    @GET
    Observable<ResponseBody> GetChannel(@Url String url);

}

